//----------------------------------------------------------------------------
#ifndef FDlgRechercheProduitH
#define FDlgRechercheProduitH
//----------------------------------------------------------------------------
#ifdef RUSEINCLUDE
#include <Classes.hpp>
#include <Controls.hpp>
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <CheckLst.hpp>
#endif

#ifndef ClassesHPP
#include <Classes.hpp>
#endif

#ifndef ControlsHPP
#include <Controls.hpp>
#endif

#ifndef ExtCtrlsHPP
#include <ExtCtrls.hpp>
#endif

#ifndef StdCtrlsHPP
#include <StdCtrls.hpp>
#endif

class NoeudReseauGraphique;
class ReseauGraphique;

//----------------------------------------------------------------------------
class TDlgRechercheProduit : public TForm
{
__published:
	TButton *OKBtn;
	TButton *CancelBtn;
  TPanel *Panel2;
  TPanel *Panel3;
  TLabeledEdit *LEMasque;
  TButton *BtnToutVoir;
  TCheckBox *CBVisibles;
  TCheckBox *CBConcepts;
  TCheckBox *CBAssoc;
  TCheckBox *CBRacines;
  TCheckBox *CBRelations;
  TGroupBox *GroupBox1;
  TGroupBox *GroupBox2;
  TListBox *LBResultats;
  TPanel *Panel1;
  TPanel *Panel4;
  TListBox *LBSelection;
  TLabeledEdit *LEDescendants;
  TButton *BtnAjouter;
  TCheckBox *CBIsoles;
  TButton *BtnProchesReference;
  TGroupBox *GroupBox3;
  TLabel *LblReference;
  TButton *BtnResetDescendants;
  void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  void __fastcall LEMasqueChange(TObject *Sender);
  void __fastcall LBResultatsDblClick(TObject *Sender);
  void __fastcall BtnToutVoirClick(TObject *Sender);
  void __fastcall CBFiltreClick(TObject *Sender);
  void __fastcall LBResultatsClick(TObject *Sender);
  void __fastcall LBSelectionClick(TObject *Sender);
  void __fastcall FormActivate(TObject *Sender);
  void __fastcall BtnAjouterClick(TObject *Sender);
  void __fastcall BtnProchesReferenceClick(TObject *Sender);
  void __fastcall FormCreate(TObject *Sender);
  void __fastcall BtnResetDescendantsClick(TObject *Sender);
private:
  TStringList * FListeDeRecherche;
  AnsiString FMasqueDeRecherche;
  TList * FListeConcepts;
  TList * FListeConceptsSelectionnes;
  ReseauGraphique * FReseau;
  AnsiString FNomObjet;
  TStringList * __fastcall GetListeDeRecherche();
  AnsiString __fastcall GetSelection();
  void __fastcall SetSelection(AnsiString value);
  NoeudReseauGraphique * __fastcall ChercheNoeud(const AnsiString& nom);
  NoeudReseauGraphique * __fastcall ChercheNoeudSel(const AnsiString& nom);
  void __fastcall UpdateLBSelection(void);
  void __fastcall SetMasqueDeRecherche(AnsiString value);
  AnsiString __fastcall GetMasqueDeRecherche();

public:
  static AnsiString NomDeReference;
	virtual __fastcall TDlgRechercheProduit(TComponent* AOwner, const AnsiString &nomObjet, ReseauGraphique * reseau);
  void __fastcall ToutVoir(void);
  void __fastcall InitChoixWithConcepts(void);
  void __fastcall FiltrerRelations(void);
  void __fastcall FiltrerConcepts(void);
  void __fastcall AddSelection(const AnsiString &nom);

  __property TList * ListeConcepts  = { read=FListeConcepts };
  __property AnsiString Selection  = { read=GetSelection, write=SetSelection };
  __property AnsiString MasqueDeRecherche  = { read=FMasqueDeRecherche, write=SetMasqueDeRecherche };
};
//----------------------------------------------------------------------------
extern PACKAGE TDlgRechercheProduit *DlgRechercheProduit;
//----------------------------------------------------------------------------
#endif
